package com.tengju.support.infrastructure.persistence.mybatis.mapper.tengju.custom;

import com.tengju.support.infrastructure.persistence.mybatis.dataobject.SupportMessageContentDO;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface SupportMessageTaskMapper {

    List<SupportMessageContentDO> queryBySendStatusLessSendTime(@Param("sendStatus") Integer sendStatus, @Param("sendTime") LocalDateTime sendTime);

    List<SupportMessageContentDO> queryBySendStatus(@Param("sendStatus") Integer sendStatus);

    int insertSelective(SupportMessageContentDO supportMessageContentDO);

    SupportMessageContentDO selectByPrimaryKey(long id);

    void updateByPrimaryKeySelective(SupportMessageContentDO supportMessageContentDO);

    void deleteByPrimaryKey(@Param("id") long id,
                            @Param("updateBy") String updateBy);

    int selectPageTotal(@Param("keyword") String keyword,
                        @Param("messageTypeValList") List<Integer> messageTypeValList);

    List<SupportMessageContentDO> selectPage(@Param("keyword") String keyword,
                                             @Param("messageTypeValList") List<Integer> messageTypeValList,
                                             @Param("offset") int offset,
                                             @Param("limit") int limit);

    int updateSendStatus(@Param("messageId") Long messageId,@Param("beforeStatus") Integer beforeStatus,@Param("afterStatus") Integer afterStatus);
}
